2004-02-20 Michael Meeks <michael@ximian.com>
+ * gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl.
+ (gtk_tool_item_class_init): hook it up.
+ (gtk_tool_item_set_proxy_menu_item): synchronize sensitivity.
+
+ * gtk/gtktoolbutton.c (gtk_tool_button_property_notify):
+ chain to parent, fix strcmp bug.
+
* tests/testtoolbar.c (main): re-arrange widgets to allow
more overflowing toolbar goodness.
2004-02-20 Michael Meeks <michael@ximian.com>
+ * gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl.
+ (gtk_tool_item_class_init): hook it up.
+ (gtk_tool_item_set_proxy_menu_item): synchronize sensitivity.
+
+ * gtk/gtktoolbutton.c (gtk_tool_button_property_notify):
+ chain to parent, fix strcmp bug.
+
* tests/testtoolbar.c (main): re-arrange widgets to allow
more overflowing toolbar goodness.
2004-02-20 Michael Meeks <michael@ximian.com>
+ * gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl.
+ (gtk_tool_item_class_init): hook it up.
+ (gtk_tool_item_set_proxy_menu_item): synchronize sensitivity.
+
+ * gtk/gtktoolbutton.c (gtk_tool_button_property_notify):
+ chain to parent, fix strcmp bug.
+
* tests/testtoolbar.c (main): re-arrange widgets to allow
more overflowing toolbar goodness.
2004-02-20 Michael Meeks <michael@ximian.com>
+ * gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl.
+ (gtk_tool_item_class_init): hook it up.
+ (gtk_tool_item_set_proxy_menu_item): synchronize sensitivity.
+
+ * gtk/gtktoolbutton.c (gtk_tool_button_property_notify):
+ chain to parent, fix strcmp bug.
+
* tests/testtoolbar.c (main): re-arrange widgets to allow
more overflowing toolbar goodness.
2004-02-20 Michael Meeks <michael@ximian.com>
+ * gtk/gtktoolitem.c (gtk_tool_item_property_notify): impl.
+ (gtk_tool_item_class_init): hook it up.
+ (gtk_tool_item_set_proxy_menu_item): synchronize sensitivity.
+
+ * gtk/gtktoolbutton.c (gtk_tool_button_property_notify):
+ chain to parent, fix strcmp bug.
+
* tests/testtoolbar.c (main): re-arrange widgets to allow
more overflowing toolbar goodness.
gtk_tool_button_property_notify (GObject *object,
GParamSpec *pspec)
{
- if (strcmp (pspec->name, "is_important"))
+ if (strcmp (pspec->name, "is-important") == 0)
gtk_tool_button_construct_contents (GTK_TOOL_ITEM (object));
+
+ if (parent_class->notify)
+ parent_class->notify (object, pspec);
}
static void
guint prop_id,
GValue *value,
GParamSpec *pspec);
+static void gtk_tool_item_property_notify (GObject *object,
+ GParamSpec *pspec);
static void gtk_tool_item_realize (GtkWidget *widget);
static void gtk_tool_item_unrealize (GtkWidget *widget);
static void gtk_tool_item_map (GtkWidget *widget);
object_class->set_property = gtk_tool_item_set_property;
object_class->get_property = gtk_tool_item_get_property;
object_class->finalize = gtk_tool_item_finalize;
+ object_class->notify = gtk_tool_item_property_notify;
widget_class->realize = gtk_tool_item_realize;
widget_class->unrealize = gtk_tool_item_unrealize;
}
}
+static void
+gtk_tool_item_property_notify (GObject *object,
+ GParamSpec *pspec)
+{
+ GtkToolItem *tool_item = GTK_TOOL_ITEM (object);
+
+ if (tool_item->priv->menu_item && strcmp (pspec->name, "sensitive") == 0)
+ gtk_widget_set_sensitive (tool_item->priv->menu_item,
+ GTK_WIDGET_SENSITIVE (tool_item));
+}
+
static void
create_drag_window (GtkToolItem *toolitem)
{
{
g_object_ref (menu_item);
gtk_object_sink (GTK_OBJECT (menu_item));
+
+ gtk_widget_set_sensitive (menu_item,
+ GTK_WIDGET_SENSITIVE (tool_item));
}
tool_item->priv->menu_item = menu_item;